'use strict';
module.exports = {
  up: async (queryInterface, Sequelize) => {
    return await queryInterface.createTable('Users', {
      /*id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },*/
      id: {
        allowNull: false,
        autoIncrement: true,
        type: Sequelize.INTEGER,
        primaryKey: true,
      },
      email: Sequelize.STRING(40),
      password: Sequelize.STRING,
      username: Sequelize.STRING(40),
      weibo: Sequelize.STRING(40),
      weixin: Sequelize.STRING(40),
      team_id: Sequelize.INTEGER,
      receive_remote: Sequelize.TINYINT(1),
      email_verifyed: Sequelize.TINYINT(1),
      avatar:Sequelize.STRING(40),

      created_at: {
        allowNull: false,
        type: Sequelize.DATE,
      },
      updated_at: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: async (queryInterface, Sequelize) => {
    await queryInterface.dropTable('Users');
  }
};
